#include "stack.h"
int  init_stack(DirStack *stack) {
    stack->top = -1;
}

int  push(DirStack *stack, const char *dir) {
    if (stack->top >= MAX_DEPTH - 1) return false;
    stack->top++;
    strncpy(stack->dirs[stack->top], dir, MAX_DIR_NAME - 1);
    stack->dirs[stack->top][MAX_DIR_NAME - 1] = '\0';
    return true;
}

int  pop(DirStack *stack) {
    if (stack->top == -1) return false;
    stack->top--;
    return true;
}


